package com.jic.order.service;

import com.alibaba.fastjson.JSONObject;
import com.jic.common.base.vo.Page;
import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.order.entity.OrderGoods;
import com.jic.order.response.HotProductResponse;
import com.jic.order.response.OrderGoodsResponse;

import java.util.List;

/**
 * 订单商品明细表
 *
 * @author : yinhaijun
 * @version : v1.0.0
 * @email :
 * @since : 2020-01-13 08:52:20
 */
public interface OrderGoodsService {

	List<OrderGoods> query(OrderGoods orderGoods);

	PageResult<OrderGoods> queryPage(OrderGoods orderGoods, Page pageQuery);

	/**
	 * description: 根据商品ID查询商品销量
	 *
	 * @param productIds 商品ID
	 * @return 商品销量
	 * @author: jackHe
	 * @time: 2020/8/8 14:23
	 */
	RestResult<Integer> queryProductSalesByProductId(List<Long> productIds);

	/**
	 * description: 查询TOP8商品和销量
	 *
	 * @author: jackHe
	 * @time: 2020/8/12 12:46
	 * @return
	 */
	RestResult<List<HotProductResponse>> queryHotProduct();


	OrderGoods getGoodsInfoByOrderNo(String orderNo);

    List<OrderGoodsResponse> queryTopTenGoodes();

    RestResult<Long> insertProductbyOrder(OrderGoodsResponse queryTopTenGoodes);

	Integer updateWzCardNo(JSONObject jsonObject);

	List<JSONObject> queryCardGoods();

	List<JSONObject> querySettOrder(JSONObject jsonObject);

	List<JSONObject> querySettOrderByPay(JSONObject jsonObject);

    List<OrderGoodsResponse> queryByOrderNoAndGoodsCode(String commodityCode, String orderNo);
}